add codes for updatting views and scheduling tasks