added result string at the end
added . at result
fix bug, (line shift)