added method to generate passwords