sdt chapter 3 solutions for review

nicely split up, easier to unit test and maintain