modified simrank code a bit