moved generator to a new file