modefied frame_check.v