changes to the c code. Speed improved?