adding switching between grid view and list view