added check for password length