added path logic