fixed div and mod operator