added debugging statements