main controller update