implement very basic macro system