finish implement handling simple global constraints