bug fix: filter instead of takeWhile of course