better malloc-almost there