making the selection loop around