moved pseudo code to notes.rb