added some commentaries for macro clarity