moving interaction logic out of phyloforce.js