removed unused variables and parameters