move all optional parameters to an associative array