Added takeWhile