inverted pendulum stuff added