linking and refreshing sub view and main view