write comments

do a slight optimization by delete a temporary variable