Removed unused variables for wrapper function