added some debugging statements