working insert_ordered