moved requires into c code