Replaced cell_number function to use user_index