extract generator in its own project
add tests