A modified deferred acceptance algorithm for many-to-one matching markets with externalities among firms