added line detection (proper so it gives a value) in horiz, vert, diag tl - br