Moving function from poat.js to tree.js