how does a hygrometer work