take schema as reference when mapping keys