refactoring basic things