mean calculations working for multi_k
count and SD also bridged. Streamlining some parts.