change lenght to constraint