improves str malloc