update the right directory