https://devhubby.com/thread/how-to-implement-a-binary-tree-in-javascript