move macro out into function for gist creation