implement code to pass final TDD test for Pearson coff. sim function