separating schema and code