split implementation into multiple pieces, work in progress, only upper bound compute works