Initial implementation of the transpose method. It's really bad.