extact db handler out for reading from db