changed size_t sentsize ot ungisded long int
added quit()