snippet for writing macros