Added nose checks and finalized P2 function.
nose test added.