add foreach for array for dynamic stuff