removed third party library functions
convert .c to .cpp