replaced map:read with generate and transform in getLabel API