spec for problem three
solution for problem three