IMPLEMENTED TAIL RECURSION OPTIMIZATION WOO