new way of determining path validity