added support for multiple frames (uploaded as one .dat file)