move code from DirectionsViewController to ViewDidAppear