clean up code for readability