slight tidy of pendulum example