improved model grammar (issue #24)