cleaning the code for readability