Add param extraction function