added support for reading pgm-sequences