switching to ANSI C