Database functionality added