trim and order