rewrote transform()