Updated DB functionality