Added Database Functionality