added frame index for propper playback