some comments and code changes