added length validations
validations for length