variable number of frames