worked with ryan to refactor