better implementation for default dependencies

now also covered by unittests