Switched to NSInteger instead of NSUInteger for clarity