Text this: Synthesis, characterization and optimization of magnetic nanostructures by sol-gel technique and application in water purification