-mostly removed compiler warning
-check for sameDefinition has a tolerance added