Added own version of pavltree