Added basic DB access code