getP-methods function

getP and setP for retrieving and setting parameters