Added basic DB functions