general improvements on the mod checking implementation