function regeneration issue