now using NSInteger instead on int