added phrase generator code
added simple generator tests