Changed some comments and added some logic to control statement