a bit of cleaning the code