online optimization added