Added generator class
refactoring
set default values to 0