gamma calculation and test case
theta calculation and test case