that actually seems like a much simpler way of dealing with the last phase