Added CPU implementation - untested