updated README
code refactored after testing on irb