updated the schema write class