added calloc and realloc