Update helper_functions.php

added tree function