add docs
fix compatibility with wrap