some debugging code around