debugged your quick n dirty code...