implement direction selector