unsightly regen function added