refactor method params to use fileName instance var