updating last path