clean up and ordering