added frames.length to .pop