made types patterns and added type inference with universes