added ps7 code