added function add_ordered
added function erase