separating result formatting functionality from _assert()