genpass updated with functions