chnaged a malloc to smalloc