add realloc wrapper
rfdscat with space bug