add documentation for extract