program decodes the files correctly