added macro generation!