added echo function from example