function mapf extract