add some comments, btw it WORKS! (examined)