change for msvc complaining about pointer mismatch
cleaner end compare method