I cant see that you have declared wsave ,ssave and psave vars ?