modified to g++