clipping out the unprintable bytes now
fixed some misnamed variables, now failing somewhere else