assertions factored out