more simplification refactoring