add some dynamic memory allocation