Copied code from ShifterBotNew