by reaction of ammonia or amines with acids containing functional groups