working beautifully on ubuntu now
stripped out unnecessary commented bits