cleaning up the code to remove what's not needed