logic error in tempconv