implemented when macro