updated pfor

added a basic version of pfor