factored out A constraints