renamed variables to class properties & extracted method, removed unused "use" statements