extraction function finalized; changed parameter names