extract macro