add admod function.