comment on why m_val is used for comparison in addSorted