remove echo and add query