added a bit more in place of a real malloc.