added sugar support and build model classes