add direction switch