save todo tasks to database