ticket#8 - done. Code refactored (fixed syntax error in test code)