small amt of refactoring