support auto detection of sweep direction