gapfinder now returns int[] instead of boolean