switch a calloc to a malloc