changed sizes to NSUInteger