use online and offline adaptation