cleaned and codestyle correted