Revert "removing more stuff"

This reverts commit f7642e47f520a588fe0fcc092ab3af382881c74f.
reverting back and fixing the average temp query