fixing macros
file write implemented