using NSInteger instead of int