aded some debugging code