attempted c translation