added inferschema and applyschema to the demo