use passed dependency instead of fixed one in enclosing scope task