fixed format printing and added methods for dealing with one heap three doctors