working on large refactor