finally make the transform right. Still need to add more tests.