modified hospital agent to implement the swap stuff