adding graph similarity stuff
a few more fixes