Added generate function
Merge branch 'master' of https://github.com/johnlo/cs221-project