Updated code to use @property and @synthesize