Added div and mod function.