extended to 2 dimension