adds schema and build model