Added keyword arguments for the extraction function