use NSInteger rather than int