refactoed set_order and set_text