replaced int with NSInteger