working on slices class for longitudinal impedance calculation