some code changed. some comments added
some comments and questions added