better way to confine X to a quarter plane. still too many solns for 5x12