moved db functionality to zones from temperature