filling in echo function