first swipe at c rewrite