improved gauss_cont to accept explicit segment orders