added more debugging statements