add applytransform method. haven't debugged.