function for mod 2^256