updated to use wrapper