intention
translate problem overview pseduo-code to ruby
breaking it down