Added test for thetaw
Added thetaw function