added the functionality of adding list to database and displaying it on the frontend