added some debugging messages