take db variable rather than hardcoded 'hemlock'