updateTheta function is now a 1 liner