Working version, although it only outputs a maximum of 100 characters long string, both printed or assigned to a variable