added some schema generation code