added basic password generation function