tests for vertical and horizontal cases