some comments and improved parser