minor changes and commenting