Now saves all data to a database