added support for diagonals