cleaned up the code to get ready for the next step