Finding the period of a simple pendulum