Trying to decide how to re-write this using TDD for good practice