Added auto-calculations for th2
fixed merged