add calculation of entropy