refactor
even more refactoring