switching to a more decoupled implementation