realloc needs customization. everything else works well