Added more database functions