update: cast NSInteger to int