working on pascal-trp and pascal-reg