remove the temporary variable $req where it is underused and use it in every place if it is already in use
Merge pull request #1422 from szabgab/szabgab/refactor-req

remove the temporary variable $req where it is underused