moved realization to cpp