replaced database persistence with writing to json file