more major refactor