refactor to leaner methods and no deps