further simplification/refactoring