Horizontal and vertical match algorithms working. Still working on both at once