improved tests so that they cover dependencies as well