moved constraints to updateConstraints