created a montrous function to order lists