codes and macros