Improve codeflow, avoid using extra var

Title says it all