Added basic database interaction