naive version of split-into-monotonics done