wait working even after modification :) wrote some more code for pru1