debug-tests function