refactored dependency management