saved empty matrix ready for analysis and changed script to work on entire directory