using yield, __dict__