*edit* others posted my <200 lines solution already ...