add original c version