code now compiles with cpp gpp code