filled in most macros, it is now mostely functional