new user gen code sample