Compounds containing thiol groups