added necessary constraints