0.2 check length of frames to avoid crashes 0.1 first implementation