added two examples, while loop, and optimized simple_split