clean up the code