added entropy calc