incomplete cleaning, refactoring and debuggin