refactoing in prep for next phase