changed group to ArrayList and removed cast