Added code for table view