removing pointless forEach statements