extract_params function

Extract parameters