added check constrains