update main for interactivity.