hash handling for doc mode