my hackish but fully tested solution for dependency resolution \o/