added debugging.