added some comments, removed spurious println