implemented echo functionality.