last commit before refactor to use string libraries in c