make selection in either direction work