add reduce and each slice