adding ngen functions