separated wrapping function and resolving function