added dynarray_add and dynarray_expand with tests