remove unused array and add core data save and fetch functions
1. remove unused code
2. add core data save function and fetch function