first draft
added password length check