Solved ex3. A bit too short and simple maybe? :-D