hw2 - 2d + tests for 2cd