change calloc to malloc