added grammar for types