simplified code & fixed mixed up temperature xpath filters