Added DB functions.