This was a programming test I did for a job - just thought it would be nice to save it.