fixed compatibility_threshold function, function name and returned variable were mispelt compatbility_threshold