added echo stuff from linux port