Designing smoothing functions for improved worst-case competitive ratio in online optimization