edit switchDirection