Switched to using c-type arrays