add mod and tests