it lives both in protected lagoons and outer reefs