Retrieving the data and compare with the core data so it doesn't add duplicate