Uses core data to save and fetch data