generalized code
Merge pull request #4 from voisardf/prtemp_branch

generalized code