add temp to averrage calculation