Refactor with var