Updated robot code