add comment about ignoring the idx
some minor changes for readiability and style