Added legal header.
Added macro as a new function, leaving old implementation in place.