fix memory allocation bugs
change print text