added length validations