Functions to calculate dielectric constant implemented. Not testet thou!