moved GetCh to jms_utils