improve mod operations algorithms
add sources