Add vertical checking

Refactor horizontal check to be consistent