Added planC as an optional input argument