similarity now allows integer values (not only doubles)