added type definitions and collation parsing