macro & doc improvements