simplify registertemp slightly