path logic