fourth refactor