more grammar, additional test, and more flexible script