changed `pure` and `return` to wrap