separated pure extraction logic and specific logic, hence the new
package