cleanup and ordering