implementation of deadman in bride-generated cpp. not working