Refactor: removing unneeded comparisons