Added function to generate passwords