modified reading back of chars to handle all total bytes