* safer allocation of dynamic arrays with unique_ptr