functionality complete, about to refactor