experimenting with and fixing malloc