removed some unused variables.