A correlation between kinetics of corrosion and the mechanism of inhibition by organic compounds