change function from void to char*