Added DB handling