need to fix bugs in dynalloc