updated to support gcc