made changes to take care of the last added constraint