updating genpayload to use lib