Replaced int with NSInteger