beginning 2nd refactor