Peter adds tests and saves the day