Added functionality to TempViewController and DistViewController