Added contraint checking