use dynamic allocate

use dynamic allocate