fixed add - tests passed.
tried to implement cast_to_private_base helper