very minor changes to get it to work on my pg