mod function is added