Add saving and reading to database