adding code to MARK_analyses to allow it to loop over the files