db handler fixing and completing