updating path dynamically