calculating entropy