p2c improved and params structure added