refactored code, program now allows for recording multiple files of either friendly or hostile behavior depending on keypress