added  temp controller code