some comments and debugging printouts