some cleaning in the code