moved quit to method, added \r\n to new in header