added stack control to PER

16 files changed