test were broken because of inefficient debug function