debugging for gpm script