created transpose method