added methods to dbi
fixed merge conflicts