clever way to determine path