updated the renameFiles method to take the String filter argument