added preemptive surrender command, untested.
surrrender function working, pushed to master