created a check for duplicate records on the addParams function to prevent dubplicate entries