Added code for DatabaseService