tied todo list to database and added pagination