refactoring & simplifying