made add url parameters a utility function
use add_url_parameters utility function