Added DB functions