changed int to NSInteger