made echo sink more flexible and fixed port bug