first chunk of refactoring as discussed in team meeting