refactoring for many things