updated to reduce number of assignment in templates. update for rSKd3ce9ad0fcbb