add code for reading macro files, currently segfaulting