Added mod and prime operations