formating and cleaning