improve validation - add header length