main: switched values being passed to segment()