gotta fix the mismatch of algorithm to output string