added tests. red green refactor methodology