re-added some inadvertently deleted code.