refactor 1 near complete