Added more DB functionality