now uses unsigned char
fixed line-endings