implementation moved to cpp