horizontal and vertical matching working

just need to code double - i.e. L and T matches