more debug and tests