added code for view controller, have swift issue