Adding password generation function