make logic easier to read
remove redundant var