removed macro env and introduce expand_macro