Fixed test cases
Added generator