int type changed to NSInteger