multiple constraints working