fixed issues. changed from shelve to json for saving data