added a test function and added checkbox in views.