Broke code into four functions; collects .srn