Added try and end function need added it to FunParser and write calculate