add c version of wavefront