adding the relgrama with constraints