scrapped the c code