remove path function updated