maybe fixed a memory leak, changed cbrt to pow