Improve wrapper function a little bit