add updateMainView method