wrap everything in a single _shannon function