updated query sent - added a newline character at the end