implement lsh and improve similar calculation