refactoring and introducing ALOT of new bugs