full core data implementation, not tested