remove usage of `.forEach`