starting refactor