adding if check before extending incomingparams into output