move to flip gen logic to layout-generator