another stab...
sarge's code reduced to 135
 Code:
Function a($,$p)
Dim $c, $i

	While ~$p
		$a = $a + (x>$c)
		$p = $p - 1
		$c = 0+$
		$ = substr($,3)
		For each $i in split($)
			If $c<$i
				$  = $ + ' ' + $c
				$c = x
				if $p < 0
					$p = ($^) / 2
EndFunction
_________________________
!

download KiXnet