foreach with case