use forEach instead of for
merge em and rem