gen.sh updated for basic class