add functions to rest of grammar