fixing tests + debugging