functional version of checking horizontal connections