get query from user input