define decide function in secondary scenario