trying to come up with a more elegant model to remove square and triangle constraints because they are costly in computation time