added c test and extern example