Do as the Romans do. A model of conformity with the endogenous formation of preferences