minor output and loop changes