Fixed docstring issue
Added thalvl function
Added test for thalvl function