wrap mode up/down logic