add matrix transpose and flip vert