Add selection view and code refine