get the code more tidy