Add function/wrap. Fixes #179

Fixes #179