explain transformation and give code snippets