solved more gracefully