everything but realloc works, but needs improvement