removed $finename variable