refactor to use the wrapper