insert scandata in Coredata-before refuctoring