boundary constraints could be more compact