Design of a stabilizing controller in the tacking problem