Split calculation of insetion_index from prioritize_queue