finished functionality for generating passwords