impl PSS/E V31 and bug fix