refactoring... still far from dont