streamlining and refactoring