Update to problem 4. Refactored to decouple methods. Changed to static as we do not really need an object -- no fields are stored.