improve the view && add the test for functional