modify for use c