added crude termination (program now quitable)