First pass a c impl