refactored using new generator. added demo. fixed readme.