Update pse to be more general