trying to clean the code