store data to local database, closes #3