transform logic