Updates to get query to work