more generic genbeans.lua