cleanup code
correct variable/parameter types