added macros and file printing