add direction switch flag