refactor and open up for subdependencies