Adds DB functionality