start slight refactoring