add test code in viewcontroller