added more comments, and a test file