added database functionality to add to list