moved to c code, time to test