made ansi-c compliant