[refactor] move variables into the block it's used