working on better version of combination generation using grey codes