corrected unchecked type warnings on HashMap and method type.