macro cleanup