Continue filling out the algorithm in cal.rb