Use Go functions instead of C functions