Biochemical characterization and mechanistic study of heavy metal detoxification in the metal resistant bacteria