add path logic