Refactor initial result variable