added macros and stuff