added length check to frame