Optimization of the sol—gel process for the development of optochemical sensors