Creating Generator (bugged)