udpated to work with gcc on ubuntu