add code to redirect when mapping finish