first version of generateBass