the C version works !!!1!