Added extract_item function