refactoring and adding length constraints