check contraints