more goonpugd code
sort of working code