support 2-D M-size (M is an even number)
add TODO