added more comments and changed some output text