Refactor - allow any number of frames to be passed