optimized the widgets