psuedo tempserver code