Use custom segment function.