improved pbmreader