working on global method in plain c