inserted some debugging stmnts