rework sorted_insert to use append operator