refactor to clarify abstraction layers