factored out model test