fixed bug, should be strlen -1 in echo3