refactoring a bit, added custom dependencies class