improving/fixing malloc