update from PCS fork