more about theta calculation