merged code for parameter-support