Refactor of wrapper