Adding display method for the submitted query