Removed redundant n>1 in while loop