simplifications, refactoring