better echo handling