Generator working