changed stack to be protected