fixed map insert
renamed tolerance constant