first clean up and correction