debug code in gen deleted