Refactor code. Uses === and forEach function