initial work towards refactor