add a constructor to Type.java