update the main activity