moved variables to pp