clean up and format