move cp_pgw,cp_pgh from globalbs into class