some small additions and fixes to echo