comments, format improved, doc